/////////////////////////
// 	Interfac.h	:	v0010
//	Written by 	:	Li	Haijun
//	Compiler	:	Microsoft Visual C++ 4.0
//	v0010		:	Nev.7.1996
/////////////////////////

/////////////////////////////////////////////////////////////////////////////
// All button operation function for the interface
 
#ifndef __INTERFAC_H__
#define __INTERFAC_H__

#include	"ddapi.h"
#include	"stdafx.h"
#define	FACE_ERROR_ID	2000

/////////////////////////////////////////////////
//	to load all bitmap files to the sBack surface
/////////////////////////////////////////////////
BOOL	FACE_LoadAllBmp();
BOOL FACE_ShowAllBmp(BOOL showflag = FALSE );	// FALSE -> just blit the bitmap to back-buffer
												// TRUE -> to update the bitmap from back-buffer to front buffer after blit it to back-buffer
void	FACE_ReleaseAllBmp();
// to load the main back-ground of this menu
BOOL	FACE_PreloadMainBackGround(void);
BOOL	FACE_ShowMainBackGround(int PosX=0, int PosY=0, int Width=0, int Height=0);
void	FACE_DeleteMainBackGround(void);
// to show the right block of the main frame
BOOL	FACE_ShowRightBlock();
// to show the block of main interface frame
void	FACE_ClearCommandUnitArea(BOOL flag);	// to show the background block of command unit area
												// FALSE-> to blit the block to back-buffer
												// TRUE -> to update the block from back-buffer to front buffer
void	FACE_ClearPromptArea();			// to show the background block of prompt area
///////////////////////////////////////
//	to set the message 
//void	FACE_SetMessage(void);
// to show the net work message at the set net work menu
// to set the message for the set network menu
void	FACE_NetWorkSetMessage(void) ;


////////////////////////////////////////
//	to set state of command
int		FACE_SetCommandState( int nState );
// to get the state of current command
int		FACE_GetCommandState();
// to get the state of previous command
int		FACE_GetPreCommandState();

////////////////////////////////////////////////////////////////
//	to set the state of program and return the old program state
int		FACE_SetProgramState( int nState );
// to get the state of program
int		FACE_GetProgramState();
// to get the previous state of program
int		FACE_GetPreProgramState( );

/////////////////////////////////////////
// to set all command button to hide
void	FACE_HideAllCommandButton();

/////////////////////////////////////////////////
//	to set the state of the twenty number buttons
void	FACE_SetNumberButtonState(int number, int state, BOOL ShowCurrentPage=TRUE );

/////////////////////////////////////////
// to test whether a button is clicked
/////////////////////////////////////////
//BOOL	FACE_LeftButtonDown(int xPos, int yPos);
// to test whether cursor is on current button when left button up
//BOOL	FACE_LeftButtonUp(int xPos, int yPos);
// to test whether cursor is moved on a button
//BOOL	FACE_MouseMove(WPARAM wParam,int xPos, int yPos);
// to test whether cursor is select a general if selected to confirm it
//BOOL	FACE_LeftButtonDoubleClick(WPARAM wParam, int xPos, int yPos);
// to cancel this menu 
//void	FACE_RightButtonDown(WPARAM wParam, int xPos, int yPos);

//////////////////////////////////////////////////////////////////////////////////////////
//     						prompt functions											//
//																						//
//		LPCTSTR	GetCurrentString()														//
//		void Prompt( HWND hwnd, LPCTSTR message, int posX = 30, int posY = 460 )			//
//		void echo_prompt( HWND hwnd, LPCTSTR message, int posX = 30, int posY = 460 )	//
//////////////////////////////////////////////////////////////////////////////////////////
// to check whether inputting a string, if do, put the string into MESSAGE_BUF
//BOOL FACE_IsInputString( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
// to get the current input string from outside
//LPCTSTR	FACE_GetCurrentString();
// to show a string to the directly rigon
//void FACE_Prompt( HWND hwnd, LPCTSTR message, int posX = 30, int posY = 460 );
// to show the message string to the bottom block rigon
//void FACE_ShowMessage( HWND hwnd, LPCTSTR message, int posX = 30, int posY = 460 );
//	to show the prompt message and keybroad input together
//void FACE_Echo_prompt( HWND hwnd, int posX = 30, int posY = 460 );
//void FACE_UpdateMessageRect(void);
///////////////////////////////////////////////////////////////////////
//	This function is be used by Liu Gang 
//	to show the prompt text of the game_AI
//	for example : to show " We are under Attack ! "
void	FACE_ShowPromptInfor( int InforId ) ;
//////////////////////////////////////////
// to initialate all element of interface
void FACE_InitInterface(void);
// to set the palette
void	FACE_SetPalette( class CDDPalette	Pal );
// to show the begin bitmap file
BOOL	FACE_ShowABitmapPicture( int flag );	// flag -> to indentify which bitmap picture to show
												//	PICTURE_BEGIN --> the top picture
												//	PICTURE_WAIT  --> the wait picture
												//	PICTURE_END	  --> the end picture when quit the game
// to show the event
BOOL	FACE_ShowEvent( int flag ) ;	// flag -> to indentify which event happen
///////////////////////////////////////////////////////////////////////////////
// to blit the CurrentMenu to the client area. This function is just write for Liu Gang
void FACE_BlitCurrentMenu(void) ;
// to initialation all CDDString instances and all strings
void FACE_InitAllStrings() ;
/////////////////////////////////////////
#endif
